import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import "@/utils/index.js"


// 引入全局样式
import '@/styles/index.scss'

//阿里文字图标
import '@/assets/fonts/iconfont.css'//font-class 引用
import '@/assets/fonts/iconfont.js'//Symbol 引用
// vant
import { 
   Tab,
   Tabs,
   Empty,
   Icon,
   Grid, 
   GridItem,
   ConfigProvider, 
   Form, 
   Field, 
   CellGroup, 
   Button,
   Search,
   NavBar,
   Swipe,
   SwipeItem,
   Sidebar,
   SidebarItem,
   IndexBar,
   IndexAnchor,
   PullRefresh,
   Divider,
   Sticky,
   Popup,
   ActionBar,
   ActionBarIcon,
   ActionBarButton,
   ShareSheet,
   Lazyload
} from 'vant';// Toast
//vant   Vant 中有个别组件是以函数的形式提供的，包括 Toast，Dialog，Notify 和 ImagePreview 组件
// Toast
import { Toast } from 'vant';
import 'vant/es/toast/style';

// Dialog 弹窗
import { Dialog } from 'vant';
import 'vant/es/dialog/style';

// Notify
import { Notify } from 'vant';
import 'vant/es/notify/style';

// ImagePreview
import { ImagePreview } from 'vant';
import 'vant/es/image-preview/style';


const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(Form);
app.use(Field);
app.use(CellGroup);
app.use(Button);
app.use(NavBar);
app.use(Search);
app.use(Toast)
app.use(Dialog)
app.use(Notify)
app.use(ImagePreview)
app.use(ConfigProvider);
app.use(Swipe)
app.use(SwipeItem)
app.use(Grid)
app.use(GridItem)
app.use(Sidebar);
app.use(SidebarItem);
app.use(IndexBar);
app.use(IndexAnchor);
app.use(PullRefresh);
app.use(Divider);
app.use(Sticky);
app.use(Popup);
app.use(ActionBar);
app.use(ActionBarIcon);
app.use(ActionBarButton);
app.use(ShareSheet);
// app.use(Lazyload);
// 注册时可以配置额外的选项
app.use(Lazyload, {
  lazyComponent: true,
});
app.use(Icon)
app.use(Empty)
app.use(Tab)
app.use(Tabs)

app.mount('#app')
